package preserve.extract.after;


import preserve.extract.After;
import preserve.extract.Before;

/**
 * 重构之后
 */
@After
public class HeatingPlan {

    private TempRange tempRange;

    @After
    public Boolean withinRange(int low, int high) {
        return low >= tempRange.getLow() && high <= tempRange.getHigh();
    }
    /**
     * 为参数列添加新的参数项，用以传递完整的TempRange对象
     * @param roomRange
     * @return
     */
    @Before
    public Boolean withinRange(TempRange roomRange) {
        return (roomRange.getLow() >= tempRange.getLow() && roomRange.getHigh() <= tempRange.getHigh());
    }

    @Before
    public Boolean withinRang(TempRange roomRange) {
        return (tempRange.includes(roomRange));
    }
}
